import request from '@/utils/request'
// api地址
const api = {
	getInfo: 'api/user/getInfo',
	userUpdate: 'api/user/userUpdate',
	customerInfo: 'api/customer/index',
	applyWithdraw: 'api/UserWithdrawal/applyWithdraw',
	withdrawalRecord: 'api/UserWithdrawal/withdrawalRecord',
	bindingWx: 'api/user/bindingWx',
	logout: 'api/user/logout',
	logoff: 'api/user/logoff',
	getCollectPageList: 'api/collect/getPageList',
	userVipApply: 'api/UserVipApply/userVipApply',
	getUserVipApply: 'api/UserVipApply/getUserVipApply',
	getAccountRecord: 'api/user/getAccountRecord',
	createRechargeOrder: 'api/recharge/createRechargeOrder',
	track: 'api/Browse/track',
	storeApply: 'api/UserEnterpriseAuth/apply',
	bindParent: 'api/user/bindParent',
	storeApplyDetails: 'api/UserEnterpriseAuth/detail',
	invite: 'api/user/getInviteRecord'
}

// 用户信息
export function getInfo(data) {
	return request.get(api.getInfo, data)
}
// 用户信息修改
export function userUpdate(data) {
	return request.post(api.userUpdate, data)
}
// 客服信息
export function customerInfo(data) {
	return request.get(api.customerInfo, data)
}
// 用户提现
export function applyWithdraw(data) {
	return request.post(api.applyWithdraw, data)
}
// 用户提现记录
export function withdrawalRecord(data) {
	return request.get(api.withdrawalRecord, data)
}
// app上绑定微信(待完成)
export function bindingWx(data) {
	return request.post(api.bindingWx, data)
}
// 退出登陆
export function logout(data) {
	return request.post(api.logout, data)
}
// 注销账户
export function logoff(data) {
	return request.post(api.logoff, data)
}
// 创建充值订单
export function createRechargeOrder(data) {
	return request.post(api.createRechargeOrder, data)
}
// 账户余额记录
export function getAccountRecord(data) {
	return request.get(api.getAccountRecord, data)
}

/* 绑定父级 */
export function bindParent(data) {
	return request.post(api.bindParent, data)
}

// 会员申请
export function userVipApply(data) {
	return request.post(api.userVipApply, data)
}
// 会员申请记录
export function getUserVipApply(data) {
	return request.get(api.getUserVipApply, data)
}
// 企业认证申请
export function storeApply(data) {
	return request.post(api.storeApply, data)
}
// 用户企业认证详情
export function storeApplyDetails(data) {
	return request.get(api.storeApplyDetails, data)
}
/* 邀请记录 */
export function inviteRecord(data) {
	return request.get(api.invite, data)
}